﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User/UC1.master" AutoEventWireup="true" CodeFile="UC1Profile.aspx.cs" Inherits="User_UC1Profile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" Runat="Server">
    <script src="../js/lib/jquery1.4.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
    window.onload = function ()
    {
        if (I("dv"))
        {
            var dvs = I("dv").getElementsByTagName("em");
            for (var i = 0; i < dvs.length; i++)
            {
                var dv = dvs[i];
                if (!I(dv.getAttribute("sort")))
                {
                    I(dv.getAttribute("for")).value = dv.getAttribute("dv");
                }
                else
                {

                }
            }
            I("dv").removeChild();
        }
    }
    String.prototype.trim = function (s)
    {
        if (s) return this.replace(s, "").replace(/(^\s*)|(\s*$)/g, "");
        return this.replace(/(^\s*)|(\s*$)/g, "");
    }
    function checkSub(theForm)
    {return true;
        var ps = theForm.getElementsByTagName("input");
        for (var i = 0; i < ps.length; i++)
        {
            var p = ps[i];
            var ss = p.getAttribute("NotNull");
            if (p.getAttribute("NotNull"))
            {
                if (p.value.trim().length == 0)
                {
                    s = p.parentNode.previousSibling;
                    if (s.nodeType == 3) s = s.previousSibling;
                    return SubMsg("请填写" + s.innerHTML.trim('：') + "！", p);
                }
            }
        }
        if (V("tbxCompanyAbout").length == 0)
        {
            return SubMsg("请填写企业简介！", I("tbxCompanyAbout"));
        }
        if (reg(V("tbxEmail"), /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/))
        {
            return SubMsg("Email格式不正确！", I("tbxEmail"));
        }
        if (reg(V("tbxWebsite"), /^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/))
        {
            return SubMsg("公司网址格式不正确！", I("tbxWebsite"));
        }
        return true;
    }
    function reg(s, patrn)
    {
        return !patrn.test(s)
    }
    function SubMsg(msg, p)
    {
        alert(msg);
        p.focus();
        return false;
    }
    function I(a)
    {
        return document.getElementById(a);
    }
    function V(a)
    {
        return document.getElementById(a).value;
    }
    function cityResult()
    {
        $.post("/XHR/city.ashx", { "c": I("province").value }, function (data)
        {
            if (data.length > 0)
            {
                $("#city").html(data);
            }
        }
        );
    }
</script>
<div class="userright">
<DIV class="title">企业信息</DIV><form action="?act=t" method="post" onsubmit="return checkSub(this)">
<asp:Literal ID="Ldv" runat="server"></asp:Literal>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0" class="edit_profile">
  <tbody>
            <tr>
                <th>
                    公司名称：
                </th>
                <td>
                    <input class="must" name="tbxCompanyName" type="text" id="tbxCompanyName" NotNull="1" runat="server" /><span>* </span>
                </td>
            </tr>
            <tr>
                <th>
                    所在地区：
                </th>
                <td>
                    <select id="province" onchange="cityResult();" name="province">
                                        <option value="1" selected="selected">北京</option>
                                        <option value="2">天津</option>
                                        <option value="3">河北</option>
                                        <option value="4">山西</option>
                                        <option value="5">内蒙</option>
                                        <option value="6">辽宁</option>
                                        <option value="7">吉林</option>
                                        <option value="8">黑龙江</option>
                                        <option value="9">上海</option>
                                        <option value="10">江苏</option>
                                        <option value="11">浙江</option>
                                        <option value="12">安徽</option>
                                        <option value="13">福建</option>
                                        <option value="14">江西</option>
                                        <option value="15">山东</option>
                                        <option value="16">河南</option>
                                        <option value="17">湖北</option>
                                        <option value="18">湖南</option>
                                        <option value="19">广东</option>
                                        <option value="20">广西</option>
                                        <option value="21">海南</option>
                                        <option value="22">重庆</option>
                                        <option value="23">四川</option>
                                        <option value="24">贵州</option>
                                        <option value="25">云南</option>
                                        <option value="26">西藏</option>
                                        <option value="27">陕西</option>
                                        <option value="28">甘肃</option>
                                        <option value="29">青海</option>
                                        <option value="30">宁夏</option>
                                        <option value="31">新疆</option>
                                        <option value="32">台湾</option>
                                        <option value="33">香港</option>
                                        <option value="34">澳门</option>
                                        </select>　 <select id="city" name="city">
                                        <option value="374" selected="selected">北京市</option>
                                        </select> <span class="redxin">*</span>
                </td>
            </tr>
            <tr>
                <th>
                    成立年份：
                </th>
                <td>
                    <input class="must" name="tbxBuildYear" type="text" id="tbxBuildYear" NotNull="1" runat="server" /><span>* </span>如：2000
                </td>
            </tr>
            <tr>
                <th>
                    联系人：
                </th>
                <td>
                    <input class="must" name="tbxContactPerson" type="text" id="tbxContactPerson" NotNull="1" runat="server" /><span>* </span>
                </td>
            </tr>
            <tr>
                <th>
                    固定电话：
                </th>
                <td>
                    <input class="must" name="tbxTel" type="text" id="tbxTel" NotNull="1" runat="server" /><span>* </span>
                </td>
            </tr>
            <tr>
                <th>
                    部门：
                </th>
                <td>
                    <input class="must" name="tbxDeptName" type="text" id="tbxDeptName" runat="server" size="12" />
                </td>
            </tr>
            <tr>
                <th>
                    职位：
                </th>
                <td>
                    <input class="must" name="tbxUserPosition" type="text" id="tbxUserPosition" runat="server" size="12" />
                </td>
            </tr>
            <tr>
                <th>
                    传真：
                </th>
                <td>
                    <input class="must" name="tbxFax" type="text" id="tbxFax" runat="server" />
                </td>
            </tr>
            <tr>
                <th>
                    手机：
                </th>
                <td>
                    <input class="must" name="tbxMobile" type="text" id="tbxMobile" NotNull="1" runat="server" /><span>* </span>
                </td>
            </tr>
            <tr>
                <th>
                    Email：
                </th>
                <td>
                    <input class="must" name="tbxEmail" type="text" id="tbxEmail" NotNull="1" runat="server" /><span>* </span>
                </td>
            </tr>
            <tr>
                <th>
                    公司网址：
                </th>
                <td>
                    <input class="must" name="tbxWebsite" type="text" id="tbxWebsite" NotNull="1" runat="server" /><span>* </span>
                </td>
            </tr>
            <tr>
                <th>
                    联系地址：
                </th>
                <td>
                    <input class="must" name="tbxCompanyAddress" style="width:400px;" type="text" id="tbxCompanyAddress" NotNull="1" runat="server" /><span>* </span>
                </td>
            </tr>
            <tr>
                <th>
                    企业简介：
                </th>
                <td>
                    <textarea class="must" id="tbxCompanyAbout" name="tbxCompanyAbout" cols="72" rows="9" runat="server"></textarea><span>* </span>
                </td>
            </tr>
            <tr>
              <td height="46"></td>
              <td><input type="submit" name="Submit" value="确认" /></td>
            </tr>
    </tbody>
  </table></form>
</div>

</asp:Content>

